package com.luisliuyi.demo.hook.ams;

import java.lang.reflect.Field;

public class ReflectUtils {


    public static Class getClass(String className){
        try {
            return Class.forName(className);
        } catch(Exception e) {
            e.printStackTrace();
        }
        return null;
    }

    public static Field readStaticField(Class clazz, String fieldName) {
        try {
            return clazz.getDeclaredField(fieldName);
        } catch(Exception e) {
            e.printStackTrace();
        }
        return null;
    }

    public static Field getField(Class clazz, String fieldName) {
        try {
            return clazz.getDeclaredField(fieldName);
        } catch(Exception e) {
            e.printStackTrace();
        }
        return null;
    }
}
